public class Book {
    private String title;
    private int pageNum;
    private String type;
    public Book(String title, int pageNum) {
        this.type = "计算机";
        this.pageNum = pageNum;
        this.title = title;
    }
    public Book(String title, int pageNum, String type) {
        this.title = title;
        this.pageNum = pageNum;
        this.type = type;
    }
    void detail()
    {
        System.out.println(this.title+","+this.pageNum+","+this.type);
    }
}
public class BookTest {
    public static void main(String[] args) {
        Book book1 = new Book("高等数学",123,"数学");
        Book book2 = new Book("Java编程",32);
        book1.detail();
        book2.detail();
    }
}
